package com.woniuxy.controller;

import com.woniuxy.bean.UserVo;
import com.woniuxy.pojo.Dept;
import com.woniuxy.pojo.User;
import com.woniuxy.service.DeptService;
import com.woniuxy.service.UserService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@RestController
@RequestMapping(value = "/user")
public class UserController extends BaseController{
    private Logger logger= Logger.getLogger(this.getClass());
    @Autowired
    private UserService userService;
    @Autowired
    private DeptService deptService;
    @RequestMapping(value = "/list")
    public List<User> list(UserVo userVo,HttpServletRequest request){
        List<User> userList=userService.findUsersByPage(userVo);
        return userList;
    }

}









